package com.cems.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cems.pojo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.shiro.crypto.hash.Hash;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.List;

/**
 * @InterfaceName AdminMapper
 * @Author 陈新予(blank)
 * @Date 2021/5/16
 * @Version 1.0
 */
@Mapper
@Component
public interface AdminMapper extends BaseMapper<SysAdmin> {

    List<SysAdmin> getAdmins();

    int getAdminIdByNum(String adminNum);

    void addAdmins(HashMap<String, String> map);

    void addAdminEmilAndPhone(@Param("adminId") int adminId, @Param("emil") String emil, @Param("phone") String phone);

    List<SysAdminInfo> getAllAdminInfo();

    void updateAdminLevel(@Param("id") String id, @Param("author") String author);

    void updateAdminStatus(@Param("id") String id, @Param("status") String author);

    void addAdminUpgrade(HashMap<String, String> map);

    List<SysAdminUpgrade> getAdminUpgrade();

    List<SysAdminUpgrade> getAdminUpgradeLimit(@Param("page") int page, @Param("limit") int limit);

    String getAdminUpgrdeData(int id);

    void delupgrade(int id);

    void GradeIsOK(int id);

    SysAdminInfo getAdminInfo(Integer adminId);

    void changePassword(@Param("newPwd") String newPwd,@Param("adminId") Integer adminId);

    void updateAdminInfo(SysAdminInfo admin);

    List<UserShensu> findShensuList();

    void jiefengUser(@Param("phone") String phone);

    void deleteShensu(String phone);

    SysAdmin selOneSysAdmin(String adminNum);

    String findStatus(String adminNum);

    void adminShensu(String adminNum, String content);

    List<AdminShensu> findAdminShensuList();


    void jiefengAdmin(String adminNum);

    void deleteShensuAdmin(String adminNum);

    void zhaohuiAdmin(String adminNum, String newpwd);

    int zhaohuicheck(String adminNum, String email);
}
